<div class="navbar-custom topnav-navbar">
  <div class="container-fluid">
    <!-- LOGO -->
    <a href="<?php $this->options->siteUrl(); ?>" class="topnav-logo d-none d-sm-block">
      <span class="topnav-logo-lg"><img src="<?php $this->options->themeUrl('images/favicon/android-chrome-512x512.png'); ?>" alt="" height="60">我的学习编程分享</span>
      <span class="topnav-logo-sm"><img src="<?php $this->options->themeUrl('images/favicon/android-chrome-512x512.png'); ?>" alt="" height="60"> </span>
    </a>
    <!-- 右侧工具栏 -->
    <ul class="list-unstyled topbar-right-menu float-right mb-0">
    <!-- 主题设置按钮 -->
      <li class="notification-list">
        <a class="nav-link right-bar-toggle" href="javascript: void(0);">
          <i class="fonts icon-shezhi noti-icon"></i>
        </a>
      </li>
      <!-- 用户信息和设置 -->
      <li class="dropdown notification-list" id="user-console">
        <a class="nav-link dropdown-toggle nav-user arrow-none mr-0" data-toggle="dropdown" id="topbar-userdrop" href="#" role="button" aria-haspopup="true" aria-expanded="false">
          <?php if ($this->user->hasLogin()) : ?>
            <span class="account-user-avatar">
              <?php echo $this->author->gravatar(32); ?>
            </span>
            <span>
              <span class="account-user-name"><?php $this->user->screenName(); ?></span>
            </span>
          <?php else : ?>

            <span class="account-user-avatar">
              <img src="<?php $this->options->themeUrl('images/default.png'); ?>" alt="user-image" class="rounded-circle">
            </span>
            <span>
              <span class="account-user-name">点击登录</span>
            </span>
          <?php endif; ?>
        </a>
        
        <!-- 用户设置弹窗 -->
        <?php if ($this->user->hasLogin()) : ?>
          <div class="dropdown-menu dropdown-menu-right dropdown-menu-animated topbar-dropdown-menu profile-dropdown" aria-labelledby="topbar-userdrop">
            <!-- item-->
            <div class=" dropdown-header noti-title">
              <h6 class="text-overflow m-0">欢迎登陆！</h6>
            </div>


            <!-- item-->
            <a href="<?php $this->options->profileUrl(); ?>" class="dropdown-item notify-item">
              <i class="fonts icon-wodezhanghuhover mr-1"></i>
              <span>用户中心</span>
            </a>

            <!-- 退出登录-->
            <a href="<?php $this->options->logoutUrl(); ?>" class="dropdown-item notify-item">
              <i class="fonts icon-tuichu mr-1"></i>
              <span>退出登录</span>
            </a>
          </div>
        <?php else : ?>
          <!-- 载入login -->
          <?php $this->need('login.php'); ?>
        <?php endif; ?>
      </li>
    </ul>

    <!-- 未知 -->
    <a class="navbar-toggle" data-toggle="collapse" data-target="#topnav-menu-content">
      <div class="lines">
        <span></span>
        <span></span>
        <span></span>
      </div>
    </a>
    <!-- 搜索 -->
    <div class="app-search">
      <form id="search" method="post" action="<?php $this->options->siteUrl(); ?>" role="search">
        <div class="input-group">
          <input type="text" id="s" name="s" class="form-control" placeholder="输入关键词...">
          <span class="fonts icon-search-solid"></span>
          <div class="input-group-append">
            <button class="btn btn-primary" type="submit">Search</button>
          </div>
            <script src="//lib.baomitu.com/layer/3.1.1/layer.js"></script>
        </div>
      </form>
    </div>

  </div>

</div>